package cn.itzqw.service.impl;

import cn.itzqw.mapper.BookMapper;
import cn.itzqw.pojo.Book;
import cn.itzqw.service.BookService;
import cn.itzqw.utils.MyBatisUtils;
import com.github.pagehelper.PageHelper;

import java.util.List;

public class BookServiceImpl implements BookService {


    private BookMapper bookMapper;

    @Override
    public List<Book> queryBookByPage(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        BookMapper mapper = MyBatisUtils.getMapper(bookMapper.getClass());

        return mapper.searchLikeByName("%spring%");
    }
}
